<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 skin-theme-clientpref-day vector-sticky-header-enabled" lang="de" dir="ltr"><head>
<meta charset="UTF-8">
<title>Box-Muller-Methode</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://de.wikipedia.org/wiki/Box-Muller-Methode"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link href="./_mw_/ext.gadget.citeRef.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.defaultPlainlinks.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonHide.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonLayout.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonStyle.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiDarkmode.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiResponsive.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.specialSearch.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Box-Muller-Methode rootpage-Box-Muller-Methode skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Box-Muller-Methode</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="de" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="de" dir="ltr">
<p>Die <b>Box-Muller-Methode</b> (nach <a href="George_Edward_Pelham_Box" class="mw-redirect" title="George Edward Pelham Box">George Edward Pelham Box</a> und <a href="Mervin_Edgar_Muller" class="mw-redirect" title="Mervin Edgar Muller">Mervin Edgar Muller</a> 1958) ist ein Verfahren zur Erzeugung <a href="Normalverteilung" title="Normalverteilung">normalverteilter</a> <a href="Zufallszahl" title="Zufallszahl">Zufallszahlen</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Definition">Definition</h2></div>
<p>Bei dieser Methode werden zunächst zwei unabhängige <a href="Standardzufallszahl" class="mw-redirect" title="Standardzufallszahl">Standardzufallszahlen</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle u_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle u_{1}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/69b0c788a124a32684f109737f7cfab7611d6a58.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle u_{1}}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle u_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle u_{2}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/b2b5855eefa1e5c167320e2fb16e432c4931b166.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle u_{2}}" loading="lazy"></span> benötigt. Diese lassen sich beispielsweise mit einem <a href="Zufallszahlengenerator" title="Zufallszahlengenerator">Zufallszahlengenerator</a> erzeugen. Standardzufallszahlen unterliegen einer <a href="Rechteckverteilung" class="mw-redirect" title="Rechteckverteilung">Rechteckverteilung</a> mit den Parametern <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/2aae8864a3c1fec9585261791a809ddec1489950.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 1}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/92d98b82a3778f043108d4e20960a9193df57cbf.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 1}" loading="lazy"></span>.
</p><p>Es lässt sich zeigen, dass man nach folgendem Transformationsschritt daraus zwei <a href="Standardnormalverteilung" class="mw-redirect" title="Standardnormalverteilung">standardnormalverteilte</a> (stochastisch) unabhängige Zufallszahlen <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{0}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{0}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/9e72d1d86e86355892b39b8eb32b964834e113bf.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.135ex; height:2.009ex;" alt="{\displaystyle z_{0}}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{1}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c3621e468231ab352b7caa30bcf0ce9b452241a6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.135ex; height:2.009ex;" alt="{\displaystyle z_{1}}" loading="lazy"></span> erhält:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{0}={\sqrt {-2\ln u_{1}}}\cos(2\pi u_{2})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mo>−<!-- − --></mo>
<mn>2</mn>
<mi>ln</mi>
<mo><!-- --></mo>
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</msqrt>
</mrow>
<mi>cos</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mn>2</mn>
<mi>π<!-- π --></mi>
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{0}={\sqrt {-2\ln u_{1}}}\cos(2\pi u_{2})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/89da053a85a9cdb62f27f38a5c87539596a8e104.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:25.812ex; height:3.343ex;" alt="{\displaystyle z_{0}={\sqrt {-2\ln u_{1}}}\cos(2\pi u_{2})}" loading="lazy"></span></dd></dl>
<p>und
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{1}={\sqrt {-2\ln u_{1}}}\sin(2\pi u_{2})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mo>−<!-- − --></mo>
<mn>2</mn>
<mi>ln</mi>
<mo><!-- --></mo>
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</msqrt>
</mrow>
<mi>sin</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mn>2</mn>
<mi>π<!-- π --></mi>
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{1}={\sqrt {-2\ln u_{1}}}\sin(2\pi u_{2})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/cbc7837844d8f6b6f7612a6edbe60c31a4a8810d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:25.556ex; height:3.343ex;" alt="{\displaystyle z_{1}={\sqrt {-2\ln u_{1}}}\sin(2\pi u_{2})}" loading="lazy"></span>.</dd></dl>
<p>Schreibt man das <a href="Geordnetes_Paar" title="Geordnetes Paar">Paar</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (z_{0},z_{1})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (z_{0},z_{1})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/8023713ea3673746f9bad6000f891a22ac672b1e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.114ex; height:2.843ex;" alt="{\displaystyle (z_{0},z_{1})}" loading="lazy"></span> in <a href="Polarkoordinate" class="mw-redirect" title="Polarkoordinate">Polarkoordinaten</a>, also
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{0}=r\cos \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>=</mo>
<mi>r</mi>
<mi>cos</mi>
<mo><!-- --></mo>
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{0}=r\cos \varphi }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/78fece9f73b38ebb6dfea449a0287f4b856d135b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.688ex; height:2.176ex;" alt="{\displaystyle z_{0}=r\cos \varphi }" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{1}=r\sin \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mi>r</mi>
<mi>sin</mi>
<mo><!-- --></mo>
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{1}=r\sin \varphi }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/f1cf98a0b1a7f6b53f4ce5835acbac15a7cdb8e8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.432ex; height:2.676ex;" alt="{\displaystyle z_{1}=r\sin \varphi }" loading="lazy"></span>,</dd></dl>
<p>dann gilt:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r={\sqrt {-2\ln u_{1}}}\ }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mo>−<!-- − --></mo>
<mn>2</mn>
<mi>ln</mi>
<mo><!-- --></mo>
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</msqrt>
</mrow>
<mtext> </mtext>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r={\sqrt {-2\ln u_{1}}}\ }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/ca6dc57136ccc7db4cac4ea056cae828a618c307.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:15.12ex; height:3.343ex;" alt="{\displaystyle r={\sqrt {-2\ln u_{1}}}\ }" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi =2\pi u_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>φ<!-- φ --></mi>
<mo>=</mo>
<mn>2</mn>
<mi>π<!-- π --></mi>
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varphi =2\pi u_{2}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/704dc982e617ce0cf6a8b8df3882c8fbe56b7e05.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.497ex; height:2.676ex;" alt="{\displaystyle \varphi =2\pi u_{2}}" loading="lazy"></span>.</dd></dl>
<p>Anwendung der <a href="Inversionsmethode" title="Inversionsmethode">Inversionsmethode</a> zur Transformation von <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle u_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle u_{1}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/69b0c788a124a32684f109737f7cfab7611d6a58.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle u_{1}}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle u_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle u_{2}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/b2b5855eefa1e5c167320e2fb16e432c4931b166.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle u_{2}}" loading="lazy"></span> in die Polarkoordinaten <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/0d1ecb613aa2984f0576f70f86650b7c2a132538.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.049ex; height:1.676ex;" alt="{\displaystyle r}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/33ee699558d09cf9d653f6351f9fda0b2f4aaa3e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }" loading="lazy"></span> zeigt, dass <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>φ<!-- φ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/33ee699558d09cf9d653f6351f9fda0b2f4aaa3e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }" loading="lazy"></span> einer <a href="Rechteckverteilung" class="mw-redirect" title="Rechteckverteilung">Rechteckverteilung</a> mit den Parametern <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/2aae8864a3c1fec9585261791a809ddec1489950.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2\pi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>2</mn>
<mi>π<!-- π --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2\pi }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/73efd1f6493490b058097060a572606d2c550a06.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.494ex; height:2.176ex;" alt="{\displaystyle 2\pi }" loading="lazy"></span> unterliegt und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r^{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r^{2}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/a363a15442d031416d1eb62254a9c726e3f6c66c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.103ex; height:2.676ex;" alt="{\displaystyle r^{2}}" loading="lazy"></span> einer <a href="Exponentialverteilung" title="Exponentialverteilung">Exponentialverteilung</a> mit dem Parameter <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\tfrac {1}{2}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
</mstyle>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\tfrac {1}{2}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/edef8290613648790a8ac1a95c2fb7c3972aea2f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:1.658ex; height:3.509ex;" alt="{\displaystyle {\tfrac {1}{2}}}" loading="lazy"></span>. Aus diesem Ergebnis lässt sich die <a href="Gemeinsame_Verteilung_von_Zufallsvariablen" title="Gemeinsame Verteilung von Zufallsvariablen">gemeinsame Verteilung</a> von <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{1}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c3621e468231ab352b7caa30bcf0ce9b452241a6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.135ex; height:2.009ex;" alt="{\displaystyle z_{1}}" loading="lazy"></span> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{2}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5abf655fa14f7ea44ad0ca781b59ff59c5f49117.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.135ex; height:2.009ex;" alt="{\displaystyle z_{2}}" loading="lazy"></span> herleiten. Sie beruht auf der Beziehung:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\tfrac {1}{2}}e^{-{\frac {1}{2}}r^{2}}\mathrm {d} (r^{2}){\tfrac {1}{2\pi }}\mathrm {d} \varphi ={\tfrac {1}{2\pi }}e^{-{\frac {1}{2}}r^{2}}r\mathrm {d} r\mathrm {d} \varphi ={\tfrac {1}{2\pi }}e^{-{\frac {1}{2}}(z_{0}^{2}+z_{1}^{2})}\mathrm {d} z_{0}\mathrm {d} z_{1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
</mstyle>
</mrow>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
</mrow>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">d</mi>
</mrow>
<mo stretchy="false">(</mo>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<mi>π<!-- π --></mi>
</mrow>
</mfrac>
</mstyle>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">d</mi>
</mrow>
<mi>φ<!-- φ --></mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<mi>π<!-- π --></mi>
</mrow>
</mfrac>
</mstyle>
</mrow>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
</mrow>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mrow>
</msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">d</mi>
</mrow>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">d</mi>
</mrow>
<mi>φ<!-- φ --></mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<mi>π<!-- π --></mi>
</mrow>
</mfrac>
</mstyle>
</mrow>
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
</mrow>
<mo stretchy="false">(</mo>
<msubsup>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msubsup>
<mo>+</mo>
<msubsup>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msubsup>
<mo stretchy="false">)</mo>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">d</mi>
</mrow>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">d</mi>
</mrow>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\tfrac {1}{2}}e^{-{\frac {1}{2}}r^{2}}\mathrm {d} (r^{2}){\tfrac {1}{2\pi }}\mathrm {d} \varphi ={\tfrac {1}{2\pi }}e^{-{\frac {1}{2}}r^{2}}r\mathrm {d} r\mathrm {d} \varphi ={\tfrac {1}{2\pi }}e^{-{\frac {1}{2}}(z_{0}^{2}+z_{1}^{2})}\mathrm {d} z_{0}\mathrm {d} z_{1}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c75015f5122bd4e7b937b81c1e824cb5a98948e2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:57.933ex; height:4.343ex;" alt="{\displaystyle {\tfrac {1}{2}}e^{-{\frac {1}{2}}r^{2}}\mathrm {d} (r^{2}){\tfrac {1}{2\pi }}\mathrm {d} \varphi ={\tfrac {1}{2\pi }}e^{-{\frac {1}{2}}r^{2}}r\mathrm {d} r\mathrm {d} \varphi ={\tfrac {1}{2\pi }}e^{-{\frac {1}{2}}(z_{0}^{2}+z_{1}^{2})}\mathrm {d} z_{0}\mathrm {d} z_{1}}" loading="lazy"></span></dd></dl>
<p>Die bisherigen Transformationsschritte erzeugen zwei standardnormalverteilte Zufallszahlen. Eine Standardnormalverteilung ist ein Spezialfall der <a href="Normalverteilung" title="Normalverteilung">Normalverteilung</a>, nämlich mit dem <a href="Erwartungswert" title="Erwartungswert">Erwartungswert</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mu =0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>μ<!-- μ --></mi>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mu =0}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/3753282c0ad2ea1e7d63f39425efd13c37da3169.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.663ex; height:2.676ex;" alt="{\displaystyle \mu =0}" loading="lazy"></span> und der <a href="Varianz_(Stochastik)" title="Varianz (Stochastik)">Varianz</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma ^{2}=1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>σ<!-- σ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo>=</mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sigma ^{2}=1}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/193637e200ca8b182a20186e31c4a195c7fd3555.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.646ex; height:2.676ex;" alt="{\displaystyle \sigma ^{2}=1}" loading="lazy"></span>.
</p><p>Um mit der Box-Muller-Methode Normalverteilungen mit beliebigen Parametern zu erzeugen, lassen sich die erhaltenen <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle z_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle z_{i}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5c6e920bac39ad09fff4efef16254595091a1025.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.881ex; height:2.009ex;" alt="{\displaystyle z_{i}}" loading="lazy"></span> nach dem Muster
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{i}=\mu +\sigma \cdot z_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>=</mo>
<mi>μ<!-- μ --></mi>
<mo>+</mo>
<mi>σ<!-- σ --></mi>
<mo>⋅<!-- ⋅ --></mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x_{i}=\mu +\sigma \cdot z_{i}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/709fe41e8cc6db45456ec7ec775095bc882ed1cd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.36ex; height:2.509ex;" alt="{\displaystyle x_{i}=\mu +\sigma \cdot z_{i}}" loading="lazy"></span></dd></dl>
<p>transformieren. In der obigen Notation steht <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>π<!-- π --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \pi }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/9be4ba0bb8df3af72e90a0535fabcc17431e540a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.332ex; height:1.676ex;" alt="{\displaystyle \pi }" loading="lazy"></span> wie üblich für die <a href="Kreiszahl" title="Kreiszahl">Kreiszahl</a>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sin }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>sin</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sin }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/ee55beec18afd710e7ab767964b915b020c65093.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.856ex; height:2.176ex;" alt="{\displaystyle \sin }" loading="lazy"></span> für den <a href="Sinus" class="mw-redirect" title="Sinus">Sinus</a>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \cos }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>cos</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \cos }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/e473a3de151d75296f141f9f482fe59d582a7509.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.111ex; height:1.676ex;" alt="{\displaystyle \cos }" loading="lazy"></span> für den <a href="Kosinus" class="mw-redirect" title="Kosinus">Kosinus</a> und <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ln }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>ln</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ln }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c0de5ba4f372ede555d00035e70c50ed0b9625d0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.939ex; height:2.176ex;" alt="{\displaystyle \ln }" loading="lazy"></span> für den <a href="Nat%C3%BCrlicher_Logarithmus" class="mw-redirect" title="Natürlicher Logarithmus">natürlichen Logarithmus</a>.
</p><p>Verwendet man zur Erzeugung der <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle u_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>u</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle u_{i}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/14f13cb025ff2e136dcbd2fc81ddf965b728e3d7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.129ex; height:2.009ex;" alt="{\displaystyle u_{i}}" loading="lazy"></span> einen <a href="Linearer_Kongruenzgenerator" class="mw-redirect" title="Linearer Kongruenzgenerator">linearen Kongruenzgenerator</a>, so liegen die Paare <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (z_{0},z_{1})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>z</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (z_{0},z_{1})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/8023713ea3673746f9bad6000f891a22ac672b1e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.114ex; height:2.843ex;" alt="{\displaystyle (z_{0},z_{1})}" loading="lazy"></span> auf einer durch eine Spirale beschriebenen Kurve. Dieses Verhalten ist eng mit dem im <a href="Satz_von_Marsaglia" title="Satz von Marsaglia">Satz von Marsaglia</a> beschriebenen <a href="Hyperebene" title="Hyperebene">Hyperebenenverhalten</a> linearer Kongruenzgeneratoren verwandt.
</p><p>Dieses Problem lässt sich umgehen, wenn statt des linearen Kongruenzgenerators ein <a href="Inverser_Kongruenzgenerator" title="Inverser Kongruenzgenerator">inverser Kongruenzgenerator</a> oder die <a href="Polar-Methode" title="Polar-Methode">Polar-Methode</a> verwendet wird.
</p><p>Die Box-Muller-Methode erzeugt zunächst zwei stochastisch unabhängige und standardnormalverteilte <a href="Zufallszahl" title="Zufallszahl">Zufallszahlen</a>, die sich dann in eine <a href="Normalverteilung" title="Normalverteilung">Normalverteilung</a> mit beliebigen Parametern transformieren lassen. Die Box-Muller-Methode erfordert die Auswertung von <a href="Logarithmus" title="Logarithmus">Logarithmen</a> und <a href="Trigonometrische_Funktion" title="Trigonometrische Funktion">trigonometrischen Funktionen</a>, was auf einigen Rechnern sehr zeitaufwendig sein kann.
</p><p>Weitere Möglichkeiten zur Erzeugung normalverteilter <a href="Zufallszahl" title="Zufallszahl">Zufallszahlen</a> sind im Artikel <a href="Normalverteilung" title="Normalverteilung">Normalverteilung</a> beschrieben. Eine Alternative ist z. B. die <a href="Polar-Methode" title="Polar-Methode">Polar-Methode</a>.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Programmierung">Programmierung</h2></div>
<p>Die Standard-Box-Muller-Methode erzeugt Werte aus der <a href="Standardnormalverteilung" class="mw-redirect" title="Standardnormalverteilung">Standardnormalverteilung</a> mit <a href="Erwartungswert" title="Erwartungswert">Erwartungswert</a> 0 und <a href="Standardabweichung" class="mw-redirect" title="Standardabweichung">Standardabweichung</a> 1. Die folgende Implementierung in der <a href="Programmiersprache" title="Programmiersprache">Programmiersprache</a> <a href="C%2B%2B" title="C++">C++</a> generiert 10 Paare von standardnormalverteilten <a href="Zufallszahl" title="Zufallszahl">Zufallszahlen</a> aus jeder <a href="Normalverteilung" title="Normalverteilung">Normalverteilung</a> mit Erwartungswert <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mu }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>μ<!-- μ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mu }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/9fd47b2a39f7a7856952afec1f1db72c67af6161.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.402ex; height:2.176ex;" alt="{\displaystyle \mu }" loading="lazy"></span> und <a href="Varianz_(Stochastik)" title="Varianz (Stochastik)">Varianz</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>σ<!-- σ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sigma }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/59f59b7c3e6fdb1d0365a494b81fb9a696138c36.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle \sigma }" loading="lazy"></span> und gibt sie auf der Konsole aus.
</p>
<div class="mw-highlight mw-highlight-lang-c++ mw-content-ltr" dir="ltr"><pre><span></span><span class="cp">#define _USE_MATH_DEFINES</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf"><random></span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf"><iostream></span>
<span class="k">using</span><span class="w"> </span><span class="k">namespace</span><span class="w"> </span><span class="nn">std</span><span class="p">;</span>
<span class="c1">// Diese Funktion berechnet zwei standardnormalverteilte Zufallszahlen z0 und z1</span>
<span class="n">pair</span><span class="o"><</span><span class="kt">double</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="o">></span><span class="w"> </span><span class="n">generateGaussianNoise</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">mu</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">sigma</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="k">constexpr</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">epsilon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">numeric_limits</span><span class="o"><</span><span class="kt">double</span><span class="o">>::</span><span class="n">epsilon</span><span class="p">();</span>
<span class="w"> </span><span class="c1">// Initialisiert den Zufallszahlengenerator im Bereich von 0 bis 1</span>
<span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">mt19937</span><span class="w"> </span><span class="nf">rng</span><span class="p">(</span><span class="n">random_device</span><span class="p">{}());</span><span class="w"> </span><span class="c1">// Standard Mersenne-Twister</span>
<span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">uniform_real_distribution</span><span class="o"><></span><span class="w"> </span><span class="n">runif</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">u1</span><span class="p">,</span><span class="w"> </span><span class="n">u2</span><span class="p">;</span><span class="w"> </span><span class="c1">// Deklaration der lokalen Variablen für die Zufallszahlen u1 und u2</span>
<span class="w"> </span><span class="k">do</span><span class="w"> </span><span class="c1">// Diese do-while-Schleife erzeugt solange Zufallszahlen bis u1 > epsilon ist</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">u1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">runif</span><span class="p">(</span><span class="n">rng</span><span class="p">);</span>
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">u1</span><span class="w"> </span><span class="o"><=</span><span class="w"> </span><span class="n">epsilon</span><span class="p">);</span>
<span class="w"> </span><span class="n">u2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">runif</span><span class="p">(</span><span class="n">rng</span><span class="p">);</span>
<span class="w"> </span><span class="c1">// Berechnet z0 und z1</span>
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">magnitude</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sigma</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">sqrt</span><span class="p">(</span><span class="mf">-2.0</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">log</span><span class="p">(</span><span class="n">u1</span><span class="p">));</span>
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">z0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">magnitude</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">cos</span><span class="p">(</span><span class="mf">2.0</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">M_PI</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">u2</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">mu</span><span class="p">;</span>
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">z1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">magnitude</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">sin</span><span class="p">(</span><span class="mf">2.0</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">M_PI</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">u2</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">mu</span><span class="p">;</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">make_pair</span><span class="p">(</span><span class="n">z0</span><span class="p">,</span><span class="w"> </span><span class="n">z1</span><span class="p">);</span>
<span class="p">}</span>
<span class="c1">// Hauptfunktion die das Programm ausführt</span>
<span class="kt">void</span><span class="w"> </span><span class="n">main</span><span class="p">()</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">mu</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="c1">// Deklaration der lokalen Variablen</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">sigma</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="c1">// Diese for-Schleife berechnet 10 Paare von standardnormalverteilten Zufallszahlen und gibt sie auf der Konsole aus</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">pair</span><span class="o"><</span><span class="kt">double</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="o">></span><span class="w"> </span><span class="n">gaussianNoise</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">generateGaussianNoise</span><span class="p">(</span><span class="n">mu</span><span class="p">,</span><span class="w"> </span><span class="n">sigma</span><span class="p">);</span><span class="w"> </span><span class="c1">// Aufruf der Funktion</span>
<span class="w"> </span><span class="n">cout</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">gaussianNoise</span><span class="p">.</span><span class="n">first</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="s">","</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">gaussianNoise</span><span class="p">.</span><span class="n">second</span><span class="w"> </span><span class="o"><<</span><span class="w"> </span><span class="n">endl</span><span class="p">;</span><span class="w"> </span><span class="c1">// Ausgabe auf der Konsole</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Weblinks">Weblinks</h2></div>
<ul><li><a href="Eric_Weisstein" title="Eric Weisstein">Eric W. Weisstein</a>: <a rel="nofollow" class="external text" href="https://mathworld.wolfram.com/Box-MullerTransformation.html"><i>Box-Muller Transformation</i>.</a> In: <i><a href="MathWorld" title="MathWorld">MathWorld</a></i> (englisch).</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Literatur">Literatur</h2></div>
<ul><li>George Edward Pelham Box, Mervin Edgar Muller: <i>A note on the generation of random normal deviates.</i> In: <i><a href="Annals_of_Mathematical_Statistics" class="mw-redirect" title="Annals of Mathematical Statistics">Annals of Mathematical Statistics</a></i>, Jg. 29 (1958), Heft 2, <span class="-print"><a href="Internationale_Standardnummer_f%C3%BCr_fortlaufende_Sammelwerke" title="Internationale Standardnummer für fortlaufende Sammelwerke">ISSN</a> <span style="white-space:nowrap"><a rel="nofollow" class="external text" href="https://zdb-katalog.de/list.xhtml?t=iss%3D%220003-4851%22&key=cql">0003-4851</a></span></span>, S. 610–611.</li>
<li><a href="Donald_Ervin_Knuth" class="mw-redirect" title="Donald Ervin Knuth">Donald Ervin Knuth</a>: <i><a href="The_Art_of_Computer_Programming" title="The Art of Computer Programming">The Art of Computer Programming</a></i>, Sec. 3.4.1, S. 117.</li>
<li>Otto Moeschlin, Eugen Grycko, Claudia Pohl, Frank Steinert: Kapitel 1.4 <i>Generating Sample Values</i>. In: Diess.: <i>Experimental Stochastics.</i> Springer, Berlin u. a. 1998, ISBN 3-540-14619-9.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Einzelnachweise">Einzelnachweise</h2></div>
<ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">Vgl. Albert J. Kinderman und John G. Ramage: <i>Computer Generation of Normal Random Numbers</i>. In: <i>Journal of the American Statistical Association</i>, Jg. 71 (1976), Heft 356, S. 893–896.</span>
</li>
</ol></div><!--htdig_noindex--><div><div class="zim-footer">
Dieser Artikel wurde von <a class="external text" title="Zuletzt bearbeitet am 2025-06-28" href="https://de.wikipedia.org/wiki/?title=Box-Muller-Methode&oldid=257444049">Wikipedia</a> herausgegeben. Der Text ist unter <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.de">Creative Commons Attribution-Share Alike 4.0</a> verfügbar, sofern nicht anders angegeben. Für die Mediendateien können zusätzliche Bedingungen gelten.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>
</body></html>